export default function (context) {
  const { route, redirect, app } = context
  route.matched.forEach((_route) => {
    // 判断页面是否要登入
    if (_route.meta.auth) {
      // 判断cookie是否存在token
      const token = app.$cookies.get('access_token')
      // 物理阻断
      if (!token) {
        console.log('token 物理阻断', token)
        redirect("/login?url="+_route.path)
      }
    }
  })
}
